

<script src="<?php echo base_url() . 'public/'; ?>assets/js/theme.js"></script>
<script src="<?php echo base_url() . 'public/'; ?>assets/js/amazeui.min.js"></script>
<script src="<?php echo base_url() . 'public/'; ?>assets/js/app.js"></script>

<style>
    .hand {cursor:hand}
    .bottomline{  border-bottom: 1px solid rgb(127, 127, 255); }
    body{text-align:center;background-image:url(<?php echo base_url();?>/public/assets/image/background.jpg); ; width: 90% ;height:600px; margin-left: 5% }
   .loginbox{background-color: white; margin:0 auto;  margin-top: 200px; width: 870px; height: 520px; border-radius:30px; }
   .loginbox_1{ width: 50%;height: 100%; float: left; }
   .loginbox_left{background-image:url(<?php echo base_url();?>/public/assets/image/loginleft.png);width: 47% }
    .loginbox_right{ width: 45%}
    .loginbox_right_1{ width: 100%;}
    .loginbox_right_top{ text-align: center;font-size: 28px; margin-top: 100px; font-weight:bold}
    .loginbox_right_mid{ height: 125px; margin-top: 55px;}
    .input{ width: 100%; height: 60px; margin:0 auto;}
    .input_1 {height: 70%}
    .bottomline1{ height: 100% ;width: 250px;}
    .input_left{ width:20%; float: left; margin-top: 20px }
    .input_left img{ }
    .input_right{ width:80%; float: left; margin-top: 20px }
    .logininput { float: left; width: 200px;  height: 30px;  }
    input {
               outline:none;
               background:transparent;
               border:none;
                outline:medium;
            }
        *:focus {
                    outline: none;
                     background-color: transparent;
                   }
        /* ::selection{background:transparent; }
         ::-moz-selection{background:transparent; }*/


     .loginbox_right_bottom{ text-align:center;}
    .reg{ text-align: center; font-size: 14px; width: 100%; height: 30px; margin-left: 40px; font-weight:bold}
    .reg a{ color: #0c7edf}
    .button{  text-align: center; width:225px; background-color: #0c7edf; margin: auto; height: 40px;  font-size: 20px; color: white; margin-top: 25px; border-radius:30px;}
    .juzhongwenzi{ margin: auto; padding-top: 4px}

</style>
<body >
<div class="loginbox" >
    <div class="loginbox_1  loginbox_left"></div>
    <div class="loginbox_1  loginbox_right">
        <div class="loginbox_right_1  loginbox_right_top"><?php echo $this->session->webinfo['webname']; ?></div>
        <div class="loginbox_right_1 loginbox_right_mid">
              <div class="input">
                  <div class="bottomline1 bottomline" >
                  <div class="input_1 input_left"><img  src="<?php echo base_url();?>/public/assets/image/user.png"></div>
                  <div class="input_1 input_right"> <input class="logininput username"  placeholder="请输入用户名"></div>
                  </div>

              </div>
            <div class="input">
                <div class="bottomline1 bottomline" >
                <div class="input_1 input_left"><img  src="<?php echo base_url();?>/public/assets/image/password.png"></div>
                <div class="input_1 input_right"> <input   type="password" class="logininput password"   placeholder="请输入密码" ></div>
            </div>
            </div>
        </div>

        <div class="loginbox_right_1 loginbox_right_bottom" >
            <div class="reg" > 还没注册账户？<a href="<?php echo base_url() . '/Welcome/reg'; ?>">立即注册</a></div>
             <div class="button tpl-login-btn hand" >   <div class="juzhongwenzi">登陆</div>  </div>
        </div>
    </div>
</div>
<div class="nexsd_wx" style=" position: absolute;left:30%;top:-15%;">
    <span style="font-size: 25px;color: white;float: left;"></span>
</div>

<div class="nexsd_wx qqbox" style=" position: absolute;left: -2%;top:14%;width: 300px">
    <span style="font-size: 20px;color: white;float: left;width: 300px"> 联系客服送黑搜表格</span>
    <img  style="width: 300px;float: left" src="<?php echo $this->session->webinfo['qq']; ?>">
</div>
<div class="nexsd_wx weixinbox" style=" position: absolute;left: 85%;top:14%">
    <span style="font-size: 20px;color: white"> 客服二维码</span>
    <img  style="width: 300px" src="<?php echo $this->session->webinfo['weixin']; ?>">
</div>
</body>

<script type="text/javascript">
    $(".tpl-login-btn").click(
        function() {
            var data = {};
            data.username = $('.username').val();
            data.password = $('.password').val();
            var url = "<?php echo site_url(); ?>/Welcome/loginAction";
            if( data.username==""){
                layer.msg("用户名不能为空", {icon: 7});
                return;
            }
            if( data.password==""){
                layer.msg("密码不能为空", {icon: 4});
                return;
            }
            $.post(url, data, function(data) {
                if (data.code != 0) {
                   /* $(".password").val('');*/
                    layer.msg(data.msg, {icon: 5});
                } else {
                    if(data.token){
                        localStorage['token']=data.token;
                        localStorage['group']=data.group;
                        localStorage['username']=data.username;
                    }
                    layer.msg('登录成功',{icon: 1,time:800},function () {
                        location.href = "<?php echo site_url(); ?>/Welcome/index";
                    });
                }
            }, 'json');
        }
    );
    var  weixin='<?php echo $this->session->webinfo['weixin']; ?>';
    var  qq='<?php echo $this->session->webinfo['qq']; ?>'
    if(weixin==""){
        $(".weixinbox").hide();
    }
    if(qq==""){
        $(".qqbox").hide();
    }
</script>
</html>
